//
//  NotificationTableViewController.m
//  高仿萝卜书摘
//
//  Created by 谢俊逸 on 2016/11/24.
//  Copyright © 2016年 谢俊逸. All rights reserved.
//

#import "NotificationTableViewController.h"
#import "XJYHeader.h"
#import "MessageTableViewCell.h"
#import "NotificationFooterView.h"
@interface NotificationTableViewController ()

@end


static NSString *const MessageCellID = @"MessageCellID";
@implementation NotificationTableViewController


- (void)viewDidLoad {
    [super viewDidLoad];

    [self registerCell];

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

- (void)registerCell{
    [self.tableView registerNib:[UINib nibWithNibName:NSStringFromClass([MessageTableViewCell class]) bundle:nil] forCellReuseIdentifier:MessageCellID];
}


- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 1;
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 1;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    MessageTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MessageCellID forIndexPath:indexPath];
    return cell;
}

-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
    NotificationFooterView *footerView = [[NotificationFooterView alloc]initWithFrame:CGRectMake(0, 0, ScreenW, 60)];
//    footerView.backgroundColor = [UIColor redColor];
    return footerView;
}

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
    return 60;
}

@end
